package cn.agiledata.bank.scores.dao;

import java.util.Date;
import java.util.List;

import org.springframework.dao.DataAccessException;

import cn.agiledata.bank.hibernateBean.Account;
import cn.agiledata.bank.hibernateBean.ScoresHis;

public interface IScoresDAO {
	//取得积分规则
	public List getScoresRule(String scoresSource, 
			String grading, Date transDate) throws DataAccessException;
	//取得积分历史记录
	public List getScoresHis(String accountId) throws DataAccessException;
	public void saveOrUpdateScoresHisWithoutFlush(ScoresHis sh) throws DataAccessException;
	//记录积分操作
	public void saveOrUpdateScoresHistory (ScoresHis sh) throws DataAccessException ;
	//测试接口
	public List getTestDao() throws DataAccessException;
//	获得个人用户
	public List getAccountList() throws DataAccessException;
//	获得默认客户等级
//	public Grading getDefaultGrading() throws DataAccessException;
//	获得推荐人
	public List getIntroduceList(String accountId) throws DataAccessException;
	//获得积分来源
	public List getScoresSource() throws DataAccessException;
	
	public ScoresHis getScoresHis(Long accountId,String scoresSource, Long transId) throws DataAccessException;
	//获取当前使用的所有积分规则
	public List getCurScoresRule(Long id);
	
	/**
	 * 取得用户当前月度获得总积分
	 * 
	 * @param account
	 * @return
	 */
	public Double getMonthScore(Account account);
	
}
